package com.hs.srm.admin.modules.sequence.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.hs.srm.admin.modules.sequence.dao.SequenceDao;
import com.hs.srm.admin.modules.sequence.entity.SequenceEntity;
import com.hs.srm.admin.modules.sequence.service.SequenceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author ych
 * @since 2020-05-08 14:15:14
 */
@Service("sequenceService")
public class SequenceServiceImpl extends ServiceImpl<SequenceDao, SequenceEntity> implements SequenceService {

    @Autowired
    private SequenceDao sequenceDao;

    /**
     * 通过序列名称获取当前序列值
     * @param seqName
     * @return
     */
    @Override
    public int getNextVal(String seqName) {
        return sequenceDao.getNextVal(seqName);
    }
}